home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / dev / c / libmpeg_src.lha / configure < prev    next >
Encoding:
Text File  |  1996-02-26  |  44.4 KB  |  1,627 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.3 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.  
  16.   --enable-dither         include code for all dithering modes (default)
  17.   --disable-dither        only include code for full-colour conversion
  18.                           (useful when linking with ImageMagick)"
  19. ac_help="$ac_help
  20.  
  21.   --enable-jpeg           include DCT code from Indep. JPEG Group (default)
  22.   --disable-jpeg          don't include the DCT code (use this when linking
  23.                           with HDF and/or JPEG libraries)"
  24.  
  25. # Initialize some variables set by options.
  26. # The variables have the same names as the options, with
  27. # dashes changed to underlines.
  28. build=NONE
  29. cache_file=./config.cache
  30. exec_prefix=NONE
  31. host=NONE
  32. no_create=
  33. nonopt=NONE
  34. no_recursion=
  35. prefix=NONE
  36. program_prefix=NONE
  37. program_suffix=NONE
  38. program_transform_name=s,x,x,
  39. silent=
  40. site=
  41. srcdir=
  42. target=NONE
  43. verbose=
  44. x_includes=NONE
  45. x_libraries=NONE
  46.  
  47. # Initialize some other variables.
  48. subdirs=
  49.  
  50. ac_prev=
  51. for ac_option
  52. do
  53.  
  54.   # If the previous option needs an argument, assign it.
  55.   if test -n "$ac_prev"; then
  56.     eval "$ac_prev=\$ac_option"
  57.     ac_prev=
  58.     continue
  59.   fi
  60.  
  61.   case "$ac_option" in
  62.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  63.   *) ac_optarg= ;;
  64.   esac
  65.  
  66.   # Accept the important Cygnus configure options, so we can diagnose typos.
  67.  
  68.   case "$ac_option" in
  69.  
  70.   -build | --build | --buil | --bui | --bu | --b)
  71.     ac_prev=build ;;
  72.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  73.     build="$ac_optarg" ;;
  74.  
  75.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  76.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  77.     ac_prev=cache_file ;;
  78.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  79.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  80.     cache_file="$ac_optarg" ;;
  81.  
  82.   -disable-* | --disable-*)
  83.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  84.     # Reject names that are not valid shell variable names.
  85.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  86.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  87.     fi
  88.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  89.     eval "enable_${ac_feature}=no" ;;
  90.  
  91.   -enable-* | --enable-*)
  92.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  93.     # Reject names that are not valid shell variable names.
  94.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  95.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  96.     fi
  97.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  98.     case "$ac_option" in
  99.       *=*) ;;
  100.       *) ac_optarg=yes ;;
  101.     esac
  102.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  103.  
  104.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  105.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  106.   | --exec | --exe | --ex)
  107.     ac_prev=exec_prefix ;;
  108.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  109.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  110.   | --exec=* | --exe=* | --ex=*)
  111.     exec_prefix="$ac_optarg" ;;
  112.  
  113.   -gas | --gas | --ga | --g)
  114.     # Obsolete; use --with-gas.
  115.     with_gas=yes ;;
  116.  
  117.   -help | --help | --hel | --he)
  118.     # Omit some internal or obsolete options to make the list less imposing.
  119.     # This message is too long to be a string in the A/UX 3.1 sh.
  120.     cat << EOF
  121. Usage: configure [options] [host]
  122. Options: [defaults in brackets after descriptions]
  123. Configuration:
  124.   --cache-file=FILE       cache test results in FILE
  125.   --help                  print this message
  126.   --no-create             do not create output files
  127.   --quiet, --silent       do not print \`checking...' messages
  128.   --version               print the version of autoconf that created configure
  129. Directory and file names:
  130.   --prefix=PREFIX         install architecture-independent files in PREFIX
  131.                           [$ac_default_prefix]
  132.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  133.                           [same as prefix]
  134.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  135.   --program-prefix=PREFIX prepend PREFIX to installed program names
  136.   --program-suffix=SUFFIX append SUFFIX to installed program names
  137.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  138. Host type:
  139.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  140.   --host=HOST             configure for HOST [guessed]
  141.   --target=TARGET         configure for TARGET [TARGET=HOST]
  142. Features and packages:
  143.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  144.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  145.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  146.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  147.   --x-includes=DIR        X include files are in DIR
  148.   --x-libraries=DIR       X library files are in DIR
  149. --enable and --with options recognized:$ac_help
  150. EOF
  151.     exit 0 ;;
  152.  
  153.   -host | --host | --hos | --ho)
  154.     ac_prev=host ;;
  155.   -host=* | --host=* | --hos=* | --ho=*)
  156.     host="$ac_optarg" ;;
  157.  
  158.   -nfp | --nfp | --nf)
  159.     # Obsolete; use --without-fp.
  160.     with_fp=no ;;
  161.  
  162.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  163.   | --no-cr | --no-c)
  164.     no_create=yes ;;
  165.  
  166.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  167.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  168.     no_recursion=yes ;;
  169.  
  170.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  171.     ac_prev=prefix ;;
  172.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  173.     prefix="$ac_optarg" ;;
  174.  
  175.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  176.   | --program-pre | --program-pr | --program-p)
  177.     ac_prev=program_prefix ;;
  178.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  179.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  180.     program_prefix="$ac_optarg" ;;
  181.  
  182.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  183.   | --program-suf | --program-su | --program-s)
  184.     ac_prev=program_suffix ;;
  185.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  186.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  187.     program_suffix="$ac_optarg" ;;
  188.  
  189.   -program-transform-name | --program-transform-name \
  190.   | --program-transform-nam | --program-transform-na \
  191.   | --program-transform-n | --program-transform- \
  192.   | --program-transform | --program-transfor \
  193.   | --program-transfo | --program-transf \
  194.   | --program-trans | --program-tran \
  195.   | --progr-tra | --program-tr | --program-t)
  196.     ac_prev=program_transform_name ;;
  197.   -program-transform-name=* | --program-transform-name=* \
  198.   | --program-transform-nam=* | --program-transform-na=* \
  199.   | --program-transform-n=* | --program-transform-=* \
  200.   | --program-transform=* | --program-transfor=* \
  201.   | --program-transfo=* | --program-transf=* \
  202.   | --program-trans=* | --program-tran=* \
  203.   | --progr-tra=* | --program-tr=* | --program-t=*)
  204.     program_transform_name="$ac_optarg" ;;
  205.  
  206.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  207.   | -silent | --silent | --silen | --sile | --sil)
  208.     silent=yes ;;
  209.  
  210.   -site | --site | --sit)
  211.     ac_prev=site ;;
  212.   -site=* | --site=* | --sit=*)
  213.     site="$ac_optarg" ;;
  214.  
  215.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  216.     ac_prev=srcdir ;;
  217.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  218.     srcdir="$ac_optarg" ;;
  219.  
  220.   -target | --target | --targe | --targ | --tar | --ta | --t)
  221.     ac_prev=target ;;
  222.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  223.     target="$ac_optarg" ;;
  224.  
  225.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  226.     verbose=yes ;;
  227.  
  228.   -version | --version | --versio | --versi | --vers)
  229.     echo "configure generated by autoconf version 2.3"
  230.     exit 0 ;;
  231.  
  232.   -with-* | --with-*)
  233.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  234.     # Reject names that are not valid shell variable names.
  235.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  236.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  237.     fi
  238.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  239.     case "$ac_option" in
  240.       *=*) ;;
  241.       *) ac_optarg=yes ;;
  242.     esac
  243.     eval "with_${ac_package}='$ac_optarg'" ;;
  244.  
  245.   -without-* | --without-*)
  246.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  247.     # Reject names that are not valid shell variable names.
  248.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  249.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  250.     fi
  251.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  252.     eval "with_${ac_package}=no" ;;
  253.  
  254.   --x)
  255.     # Obsolete; use --with-x.
  256.     with_x=yes ;;
  257.  
  258.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  259.   | --x-incl | --x-inc | --x-in | --x-i)
  260.     ac_prev=x_includes ;;
  261.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  262.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  263.     x_includes="$ac_optarg" ;;
  264.  
  265.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  266.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  267.     ac_prev=x_libraries ;;
  268.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  269.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  270.     x_libraries="$ac_optarg" ;;
  271.  
  272.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  273.     ;;
  274.  
  275.   *) 
  276.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  277.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  278.     fi
  279.     if test "x$nonopt" != xNONE; then
  280.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  281.     fi
  282.     nonopt="$ac_option"
  283.     ;;
  284.  
  285.   esac
  286. done
  287.  
  288. if test -n "$ac_prev"; then
  289.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  290. fi
  291.  
  292. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  293.  
  294. # File descriptor usage:
  295. # 0 standard input
  296. # 1 file creation
  297. # 2 errors and warnings
  298. # 3 some systems may open it to /dev/tty
  299. # 4 used on the Kubota Titan
  300. # 6 checking for... messages and results
  301. # 5 compiler messages saved in config.log
  302. if test "$silent" = yes; then
  303.   exec 6>/dev/null
  304. else
  305.   exec 6>&1
  306. fi
  307. exec 5>./config.log
  308.  
  309. echo "\
  310. This file contains any messages produced by compilers while
  311. running configure, to aid debugging if configure makes a mistake.
  312. " 1>&5
  313.  
  314. # Strip out --no-create and --no-recursion so they do not pile up.
  315. # Also quote any args containing shell metacharacters.
  316. ac_configure_args=
  317. for ac_arg
  318. do
  319.   case "$ac_arg" in
  320.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  321.   | --no-cr | --no-c) ;;
  322.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  323.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  324.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  325.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  326.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  327.   esac
  328. done
  329.  
  330. # NLS nuisances.
  331. # Only set LANG and LC_ALL to C if already set.
  332. # These must not be set unconditionally because not all systems understand
  333. # e.g. LANG=C (notably SCO).
  334. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  335. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  336.  
  337. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  338. rm -rf conftest* confdefs.h
  339. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  340. echo > confdefs.h
  341.  
  342. # A filename unique to this package, relative to the directory that
  343. # configure is in, which we can look for to find out if srcdir is correct.
  344. ac_unique_file=wrapper.c
  345.  
  346. # Find the source files, if location was not specified.
  347. if test -z "$srcdir"; then
  348.   ac_srcdir_defaulted=yes
  349.   # Try the directory containing this script, then its parent.
  350.   ac_prog=$0
  351.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  352.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  353.   srcdir=$ac_confdir
  354.   if test ! -r $srcdir/$ac_unique_file; then
  355.     srcdir=..
  356.   fi
  357. else
  358.   ac_srcdir_defaulted=no
  359. fi
  360. if test ! -r $srcdir/$ac_unique_file; then
  361.   if test "$ac_srcdir_defaulted" = yes; then
  362.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  363.   else
  364.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  365.   fi
  366. fi
  367. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  368.  
  369. # Prefer explicitly selected file to automatically selected ones.
  370. if test -z "$CONFIG_SITE"; then
  371.   if test "x$prefix" != xNONE; then
  372.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  373.   else
  374.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  375.   fi
  376. fi
  377. for ac_site_file in $CONFIG_SITE; do
  378.   if test -r "$ac_site_file"; then
  379.     echo "loading site script $ac_site_file"
  380.     . "$ac_site_file"
  381.   fi
  382. done
  383.  
  384. if test -r "$cache_file"; then
  385.   echo "loading cache $cache_file"
  386.   . $cache_file
  387. else
  388.   echo "creating cache $cache_file"
  389.   > $cache_file
  390. fi
  391.  
  392. ac_ext=c
  393. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  394. ac_cpp='$CPP $CPPFLAGS'
  395. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  396. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  397.  
  398. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  399.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  400.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  401.     ac_n= ac_c='
  402. ' ac_t='    '
  403.   else
  404.     ac_n=-n ac_c= ac_t=
  405.   fi
  406. else
  407.   ac_n= ac_c='\c' ac_t=
  408. fi
  409.  
  410.  
  411.  
  412.  
  413. # Set the default compiler options and defines (these may be 
  414. # overridden by OS-specific code below)
  415. OPT=""
  416. DEFS=""
  417.  
  418. # Get the OS, and check for a system-specific Makefile fragment to include
  419. ac_aux_dir=
  420. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  421.   if test -f $ac_dir/install-sh; then
  422.     ac_aux_dir=$ac_dir
  423.     ac_install_sh="$ac_aux_dir/install-sh -c"
  424.     break
  425.   elif test -f $ac_dir/install.sh; then
  426.     ac_aux_dir=$ac_dir
  427.     ac_install_sh="$ac_aux_dir/install.sh -c"
  428.     break
  429.   fi
  430. done
  431. if test -z "$ac_aux_dir"; then
  432.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  433. fi
  434. ac_config_guess=$ac_aux_dir/config.guess
  435. ac_config_sub=$ac_aux_dir/config.sub
  436. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  437.  
  438.  
  439. # Make sure we can run config.sub.
  440. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  441. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  442. fi
  443.  
  444. echo $ac_n "checking host system type""... $ac_c" 1>&6
  445.  
  446. host_alias=$host
  447. case "$host_alias" in
  448. NONE)
  449.   case $nonopt in
  450.   NONE)
  451.     if host_alias=`$ac_config_guess`; then :
  452.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  453.     fi ;;
  454.   *) host_alias=$nonopt ;;
  455.   esac ;;
  456. esac
  457.  
  458. host=`$ac_config_sub $host_alias`
  459. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  460. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  461. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  462. echo "$ac_t""$host" 1>&6
  463.  
  464. host_os=hpux
  465. Makefile_OS="/dev/null"
  466. case "$host_os" in
  467.   irix*) if test -z "$CC"; then CC=cc; fi ;
  468.          extras="easympeg" ;
  469.          Makefile_OS="Makefile.irix" ;;
  470.   hpux*) if test -z "$CC"; then 
  471.            for ac_prog in ccc
  472. do
  473. # Extract the first word of "$ac_prog", so it can be a program name with args.
  474. set dummy $ac_prog; ac_word=$2
  475. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  476. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  477.   echo $ac_n "(cached) $ac_c" 1>&6
  478. else
  479.   if test -n "$CC"; then
  480.   ac_cv_prog_CC="$CC" # Let the user override the test.
  481. else
  482.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  483.   for ac_dir in $PATH; do
  484.     test -z "$ac_dir" && ac_dir=.
  485.     if test -f $ac_dir/$ac_word; then
  486.       ac_cv_prog_CC="$ac_prog"
  487.       break
  488.     fi
  489.   done
  490.   IFS="$ac_save_ifs"
  491. fi
  492. fi
  493. CC="$ac_cv_prog_CC"
  494. if test -n "$CC"; then
  495.   echo "$ac_t""$CC" 1>&6
  496. else
  497.   echo "$ac_t""no" 1>&6
  498. fi
  499.  
  500. test -n "$CC" && break
  501. done
  502. test -n "$CC" || CC="none"
  503.  
  504.            if test "$CC" = "cc"; then
  505.              OPT="-Aa "
  506.            else
  507.              CC=""
  508.            fi
  509.          fi
  510.          cat >> confdefs.h <<\EOF
  511. #define _HPUX_SOURCE 1
  512. EOF
  513.  
  514. esac
  515.  
  516.  
  517.  
  518.  
  519.  
  520. # Look for the C compiler (default gcc, except on SGI's and HP's), and make
  521. # sure it supports prototypes, void, and enums properly (can't trust
  522. # __STDC__).
  523.  
  524. CFLAGS=$OPT
  525. # Extract the first word of "gcc", so it can be a program name with args.
  526. set dummy gcc; ac_word=$2
  527. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  528. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  529.   echo $ac_n "(cached) $ac_c" 1>&6
  530. else
  531.   if test -n "$CC"; then
  532.   ac_cv_prog_CC="$CC" # Let the user override the test.
  533. else
  534.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  535.   for ac_dir in $PATH; do
  536.     test -z "$ac_dir" && ac_dir=.
  537.     if test -f $ac_dir/$ac_word; then
  538.       ac_cv_prog_CC="gcc"
  539.       break
  540.     fi
  541.   done
  542.   IFS="$ac_save_ifs"
  543.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  544. fi
  545. fi
  546. CC="$ac_cv_prog_CC"
  547. if test -n "$CC"; then
  548.   echo "$ac_t""$CC" 1>&6
  549. else
  550.   echo "$ac_t""no" 1>&6
  551. fi
  552.  
  553.  
  554. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  555. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  556.   echo $ac_n "(cached) $ac_c" 1>&6
  557. else
  558.   cat > conftest.c <<EOF
  559. #ifdef __GNUC__
  560.   yes;
  561. #endif
  562. EOF
  563. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  564.   ac_cv_prog_gcc=yes
  565. else
  566.   ac_cv_prog_gcc=no
  567. fi
  568. fi
  569. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  570. if test $ac_cv_prog_gcc = yes; then
  571.   GCC=yes
  572.   if test "${CFLAGS+set}" != set; then
  573.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  574. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  575.   echo $ac_n "(cached) $ac_c" 1>&6
  576. else
  577.   echo 'void f(){}' > conftest.c
  578. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  579.   ac_cv_prog_gcc_g=yes
  580. else
  581.   ac_cv_prog_gcc_g=no
  582. fi
  583. rm -f conftest*
  584.  
  585. fi
  586.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  587.     if test $ac_cv_prog_gcc_g = yes; then
  588.       CFLAGS="-g -O"
  589.     else
  590.       CFLAGS="-O"
  591.     fi
  592.   fi
  593. else
  594.   GCC=
  595.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  596. fi
  597.  
  598. cc_flagged=`echo "$CC $CFLAGS $CPPFLAGS" |sed 's/ +/ /;s/ *$//'`
  599. echo $ac_n "checking that \"$cc_flagged\" is fairly ANSI-compliant""... $ac_c" 1>&6
  600. if eval "test \"`echo '$''{'mpeg_cv_cc_ansi'+set}'`\" = set"; then
  601.   echo $ac_n "(cached) $ac_c" 1>&6
  602. else
  603.   
  604. cat > conftest.$ac_ext <<EOF
  605. #line 606 "configure"
  606. #include "confdefs.h"
  607.  
  608. int main() { return 0; }
  609. int t() {
  610.  
  611. typedef enum { RED, GREEN, BLUE, YELLOW, BLACK } colour;
  612. void *foo (colour C);
  613. colour a = GREEN;
  614.  
  615. foo (a);
  616.  
  617. ; return 0; }
  618. EOF
  619. if eval $ac_compile; then
  620.   rm -rf conftest*
  621.   mpeg_cv_cc_ansi=yes
  622. else
  623.   rm -rf conftest*
  624.   mpeg_cv_cc_ansi=no
  625. fi
  626. rm -f conftest*
  627.  
  628. fi
  629.  
  630. CC_ANSI=$mpeg_cv_cc_ansi
  631. echo "$ac_t""$CC_ANSI" 1>&6
  632.  
  633. if test $CC_ANSI = no; then
  634.   echo $ac_n "checking for alternative C compiler""... $ac_c" 1>&6
  635.   for ac_prog in acc
  636. do
  637. # Extract the first word of "$ac_prog", so it can be a program name with args.
  638. set dummy $ac_prog; ac_word=$2
  639. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  640. if eval "test \"`echo '$''{'ac_cv_prog_ALTCC'+set}'`\" = set"; then
  641.   echo $ac_n "(cached) $ac_c" 1>&6
  642. else
  643.   if test -n "$ALTCC"; then
  644.   ac_cv_prog_ALTCC="$ALTCC" # Let the user override the test.
  645. else
  646.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  647.   for ac_dir in $PATH; do
  648.     test -z "$ac_dir" && ac_dir=.
  649.     if test -f $ac_dir/$ac_word; then
  650.       ac_cv_prog_ALTCC="$ac_prog"
  651.       break
  652.     fi
  653.   done
  654.   IFS="$ac_save_ifs"
  655. fi
  656. fi
  657. ALTCC="$ac_cv_prog_ALTCC"
  658. if test -n "$ALTCC"; then
  659.   echo "$ac_t""$ALTCC" 1>&6
  660. else
  661.   echo "$ac_t""no" 1>&6
  662. fi
  663.  
  664. test -n "$ALTCC" && break
  665. done
  666. test -n "$ALTCC" || ALTCC="none"
  667.  
  668.   if test $ALTCC = none; then
  669.     { echo "configure: error: An ANSI-compliant C compiler is required to build the MPEG Library" 1>&2; exit 1; }
  670.   else
  671.     CC=$ALTCC
  672.   fi
  673. fi
  674.  
  675. # Check for ancient gcc that doesn't set an error code (but still aborts)
  676. # when we run it with a bad optimization level -- this is a problem with 
  677. # gcc 1.36 on the NeXT.
  678.  
  679. if test "$GCC" = "yes"; then
  680.   echo $ac_n "checking how gcc handles bad optimization settings""... $ac_c" 1>&6
  681.   if eval "test \"`echo '$''{'mpeg_cv_broken_gcc'+set}'`\" = set"; then
  682.   echo $ac_n "(cached) $ac_c" 1>&6
  683. else
  684.   
  685.   touch conftest.c
  686.   $CC -O9 -c conftest.c 2> conftest.err
  687.   if test $? -eq 0 -a -s conftest.err; then
  688.     mpeg_cv_broken_gcc="broken"
  689.     opt_level="-O"
  690.   else
  691.     mpeg_cv_broken_gcc="fine"
  692.   fi
  693.   rm -rf conftest.*
  694. fi
  695.  
  696.  
  697.   echo "$ac_t""$mpeg_cv_broken_gcc" 1>&6
  698.   if test "$mpeg_cv_broken_gcc" = "broken"; then
  699.     opt_level="-O"
  700.   fi
  701. fi
  702.   
  703. # See how high an optimization level (up to -O6) the compiler will 
  704. # let us go.  This is skipped if $opt_level is already set (eg.
  705. # by the NeXT-detector code above) because the NeXT cc dies, but 
  706. # doesn't return an error code if run with an illegal -O option!
  707.  
  708. if test -z "$opt_level" ; then
  709.   echo $ac_n "checking highest available optimization level""... $ac_c" 1>&6
  710.   opt_level=""
  711.   if eval "test \"`echo '$''{'mpeg_cv_opt_level'+set}'`\" = set"; then
  712.   echo $ac_n "(cached) $ac_c" 1>&6
  713. else
  714.   
  715.   for opt in "-O" "-O2" "-O3" "-O4" "-O5" "-O6"; do
  716.     CFLAGS="$OPT$opt"
  717.     cat > conftest.$ac_ext <<EOF
  718. #line 719 "configure"
  719. #include "confdefs.h"
  720.  
  721. int main() { return 0; }
  722. int t() {
  723.  
  724. ; return 0; }
  725. EOF
  726. if eval $ac_compile; then
  727.   rm -rf conftest*
  728.   mpeg_cv_opt_level=$opt
  729. fi
  730. rm -f conftest*
  731.  
  732.   done
  733.   
  734. fi
  735.  
  736.   opt_level=$mpeg_cv_opt_level
  737.   if  test -z $opt_level ; then
  738.     { echo "configure: error: your compiler is broken" 1>&2; exit 1; }
  739.   fi
  740.  
  741.   echo "$ac_t""$opt_level" 1>&6
  742. fi
  743. OPT="$OPT$opt_level"
  744.  
  745.  
  746. CFLAGS="$OPT $DEFS"      # this is the final, real assigment to CFLAGS!
  747.  
  748. # Extract the first word of "ranlib", so it can be a program name with args.
  749. set dummy ranlib; ac_word=$2
  750. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  751. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  752.   echo $ac_n "(cached) $ac_c" 1>&6
  753. else
  754.   if test -n "$RANLIB"; then
  755.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  756. else
  757.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  758.   for ac_dir in $PATH; do
  759.     test -z "$ac_dir" && ac_dir=.
  760.     if test -f $ac_dir/$ac_word; then
  761.       ac_cv_prog_RANLIB="ranlib"
  762.       break
  763.     fi
  764.   done
  765.   IFS="$ac_save_ifs"
  766.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  767. fi
  768. fi
  769. RANLIB="$ac_cv_prog_RANLIB"
  770. if test -n "$RANLIB"; then
  771.   echo "$ac_t""$RANLIB" 1>&6
  772. else
  773.   echo "$ac_t""no" 1>&6
  774. fi
  775.  
  776. # Extract the first word of "ar", so it can be a program name with args.
  777. set dummy ar; ac_word=$2
  778. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  779. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  780.   echo $ac_n "(cached) $ac_c" 1>&6
  781. else
  782.   if test -n "$AR"; then
  783.   ac_cv_prog_AR="$AR" # Let the user override the test.
  784. else
  785.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  786.   for ac_dir in $PATH; do
  787.     test -z "$ac_dir" && ac_dir=.
  788.     if test -f $ac_dir/$ac_word; then
  789.       ac_cv_prog_AR="ar"
  790.       break
  791.     fi
  792.   done
  793.   IFS="$ac_save_ifs"
  794. fi
  795. fi
  796. AR="$ac_cv_prog_AR"
  797. if test -n "$AR"; then
  798.   echo "$ac_t""$AR" 1>&6
  799. else
  800.   echo "$ac_t""no" 1>&6
  801. fi
  802.  
  803.  
  804. # Check for "--disable-dither" and "--disable-jpeg" options: these 
  805. # options control which files will actually be compiled and included
  806. # in the library, so it has to be done at the `configure' step.
  807. # Also, enable/disable dither controls the ENABLE_DITHER #define.
  808.  
  809. # Check whether --enable-dither or --disable-dither was given.
  810. enableval="$enable_dither"
  811. if test -n "$enableval"; then
  812.   dither=$enable_dither
  813. else
  814.   dither=yes
  815. fi
  816.  
  817. if test $dither = yes; then
  818.   libsrc='$(DECODER_SRC) $(DITHER_SRC)'
  819.   libobj='$(DECODER_SRC:.c=.o) $(DITHER_SRC:.c=.o)'
  820.   cat >> confdefs.h <<\EOF
  821. #define ENABLE_DITHER 1
  822. EOF
  823.  
  824.   echo "$ac_t""including dithering code" 1>&6
  825. else
  826.   libsrc='$(DECODER_SRC)'
  827.   libobj='$(DECODER_SRC:.c=.o)'
  828.   cat >> confdefs.h <<\EOF
  829. #define ENABLE_DITHER 0
  830. EOF
  831.  
  832.   echo "$ac_t""omitting dithering code" 1>&6
  833. fi
  834.  
  835.  
  836.  
  837. # Check whether --enable-jpeg or --disable-jpeg was given.
  838. enableval="$enable_jpeg"
  839. if test -n "$enableval"; then
  840.   jpeg=$enable_jpeg
  841. else
  842.   jpeg=yes
  843. fi
  844.  
  845. if test $jpeg = yes; then
  846.   
  847.   jrevdct="jrevdct.c "
  848.   extras="$extras mpegtest"
  849.   Makefile_extras="Makefile.extras"
  850.   echo "$ac_t""including JPEG DCT code" 1>&6
  851. else
  852.   jrevdct=""
  853.   extras=""
  854.   Makefile_extras=""
  855.   echo "$ac_t""omitting JPEG DCT code" 1>&6
  856. fi
  857.  
  858.  
  859.  
  860.  
  861. # Checks for header files.
  862. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  863. # On Suns, sometimes $CPP names a directory.
  864. if test -n "$CPP" && test -d "$CPP"; then
  865.   CPP=
  866. fi
  867. if test -z "$CPP"; then
  868. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  869.   echo $ac_n "(cached) $ac_c" 1>&6
  870. else
  871.     # This must be in double quotes, not single quotes, because CPP may get
  872.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  873.   CPP="${CC-cc} -E"
  874.   # On the NeXT, cc -E runs the code through the compiler's parser,
  875.   # not just through cpp.
  876.   cat > conftest.$ac_ext <<EOF
  877. #line 878 "configure"
  878. #include "confdefs.h"
  879. #include <assert.h>
  880. Syntax Error
  881. EOF
  882. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  883. ac_err=`grep -v '^ *+' conftest.out`
  884. if test -z "$ac_err"; then
  885.   :
  886. else
  887.   echo "$ac_err" >&5
  888.   rm -rf conftest*
  889.   CPP="${CC-cc} -E -traditional-cpp"
  890.   cat > conftest.$ac_ext <<EOF
  891. #line 892 "configure"
  892. #include "confdefs.h"
  893. #include <assert.h>
  894. Syntax Error
  895. EOF
  896. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  897. ac_err=`grep -v '^ *+' conftest.out`
  898. if test -z "$ac_err"; then
  899.   :
  900. else
  901.   echo "$ac_err" >&5
  902.   rm -rf conftest*
  903.   CPP=/lib/cpp
  904. fi
  905. rm -f conftest*
  906. fi
  907. rm -f conftest*
  908.   ac_cv_prog_CPP="$CPP"
  909. fi
  910. fi
  911. CPP="$ac_cv_prog_CPP"
  912. echo "$ac_t""$CPP" 1>&6
  913.  
  914. # If we cannot run a trivial program, we must be cross compiling.
  915. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  916. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  917.   echo $ac_n "(cached) $ac_c" 1>&6
  918. else
  919.   if test "$cross_compiling" = yes; then
  920.   ac_cv_c_cross=yes
  921. else
  922. cat > conftest.$ac_ext <<EOF
  923. #line 924 "configure"
  924. #include "confdefs.h"
  925. main(){return(0);}
  926. EOF
  927. eval $ac_link
  928. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  929.   ac_cv_c_cross=no
  930. else
  931.   ac_cv_c_cross=yes
  932. fi
  933. fi
  934. rm -fr conftest*
  935. fi
  936. cross_compiling=$ac_cv_c_cross
  937. echo "$ac_t""$ac_cv_c_cross" 1>&6
  938.  
  939. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  940. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  941.   echo $ac_n "(cached) $ac_c" 1>&6
  942. else
  943.   cat > conftest.$ac_ext <<EOF
  944. #line 945 "configure"
  945. #include "confdefs.h"
  946. #include <stdlib.h>
  947. #include <stdarg.h>
  948. #include <string.h>
  949. #include <float.h>
  950. EOF
  951. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  952. ac_err=`grep -v '^ *+' conftest.out`
  953. if test -z "$ac_err"; then
  954.   rm -rf conftest*
  955.   ac_cv_header_stdc=yes
  956. else
  957.   echo "$ac_err" >&5
  958.   rm -rf conftest*
  959.   ac_cv_header_stdc=no
  960. fi
  961. rm -f conftest*
  962.  
  963. if test $ac_cv_header_stdc = yes; then
  964.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  965. cat > conftest.$ac_ext <<EOF
  966. #line 967 "configure"
  967. #include "confdefs.h"
  968. #include <string.h>
  969. EOF
  970. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  971.   egrep "memchr" >/dev/null 2>&1; then
  972.   :
  973. else
  974.   rm -rf conftest*
  975.   ac_cv_header_stdc=no
  976. fi
  977. rm -f conftest*
  978.  
  979. fi
  980.  
  981. if test $ac_cv_header_stdc = yes; then
  982.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  983. cat > conftest.$ac_ext <<EOF
  984. #line 985 "configure"
  985. #include "confdefs.h"
  986. #include <stdlib.h>
  987. EOF
  988. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  989.   egrep "free" >/dev/null 2>&1; then
  990.   :
  991. else
  992.   rm -rf conftest*
  993.   ac_cv_header_stdc=no
  994. fi
  995. rm -f conftest*
  996.  
  997. fi
  998.  
  999. if test $ac_cv_header_stdc = yes; then
  1000.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1001. if test "$cross_compiling" = yes; then
  1002.   ac_cv_header_stdc=no
  1003. else
  1004. cat > conftest.$ac_ext <<EOF
  1005. #line 1006 "configure"
  1006. #include "confdefs.h"
  1007. #include <ctype.h>
  1008. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1009. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1010. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1011. int main () { int i; for (i = 0; i < 256; i++)
  1012. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1013. exit (0); }
  1014.  
  1015. EOF
  1016. eval $ac_link
  1017. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1018.   :
  1019. else
  1020.   ac_cv_header_stdc=no
  1021. fi
  1022. fi
  1023. rm -fr conftest*
  1024. fi
  1025. fi
  1026. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1027. if test $ac_cv_header_stdc = yes; then
  1028.   cat >> confdefs.h <<\EOF
  1029. #define STDC_HEADERS 1
  1030. EOF
  1031.  
  1032. fi
  1033.  
  1034. for ac_hdr in sys/time.h unistd.h
  1035. do
  1036. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1037. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1038. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1039.   echo $ac_n "(cached) $ac_c" 1>&6
  1040. else
  1041.   cat > conftest.$ac_ext <<EOF
  1042. #line 1043 "configure"
  1043. #include "confdefs.h"
  1044. #include <$ac_hdr>
  1045. EOF
  1046. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1047. ac_err=`grep -v '^ *+' conftest.out`
  1048. if test -z "$ac_err"; then
  1049.   rm -rf conftest*
  1050.   eval "ac_cv_header_$ac_safe=yes"
  1051. else
  1052.   echo "$ac_err" >&5
  1053.   rm -rf conftest*
  1054.   eval "ac_cv_header_$ac_safe=no"
  1055. fi
  1056. rm -f conftest*
  1057. fi
  1058. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1059.   echo "$ac_t""yes" 1>&6
  1060.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1061.   cat >> confdefs.h <<EOF
  1062. #define $ac_tr_hdr 1
  1063. EOF
  1064.  
  1065. else
  1066.   echo "$ac_t""no" 1>&6
  1067. fi
  1068. done
  1069.  
  1070.  
  1071. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1072. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1073.   echo $ac_n "(cached) $ac_c" 1>&6
  1074. else
  1075.   cat > conftest.$ac_ext <<EOF
  1076. #line 1077 "configure"
  1077. #include "confdefs.h"
  1078. #include <sys/types.h>
  1079. #include <sys/time.h>
  1080. #include <time.h>
  1081. int main() { return 0; }
  1082. int t() {
  1083. struct tm *tp;
  1084. ; return 0; }
  1085. EOF
  1086. if eval $ac_compile; then
  1087.   rm -rf conftest*
  1088.   ac_cv_header_time=yes
  1089. else
  1090.   rm -rf conftest*
  1091.   ac_cv_header_time=no
  1092. fi
  1093. rm -f conftest*
  1094.  
  1095. fi
  1096. echo "$ac_t""$ac_cv_header_time" 1>&6
  1097. if test $ac_cv_header_time = yes; then
  1098.   cat >> confdefs.h <<\EOF
  1099. #define TIME_WITH_SYS_TIME 1
  1100. EOF
  1101.  
  1102. fi
  1103.  
  1104.  
  1105. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  1106. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  1107.   echo $ac_n "(cached) $ac_c" 1>&6
  1108. else
  1109.   cat > conftest.$ac_ext <<EOF
  1110. #line 1111 "configure"
  1111. #include "confdefs.h"
  1112. /* System header to define __stub macros and hopefully few prototypes,
  1113.     which can conflict with char vprintf(); below.  */
  1114. #include <assert.h>
  1115. /* Override any gcc2 internal prototype to avoid an error.  */
  1116. char vprintf(); 
  1117.  
  1118. int main() { return 0; }
  1119. int t() {
  1120.  
  1121. /* The GNU C library defines this for functions which it implements
  1122.     to always fail with ENOSYS.  Some functions are actually named
  1123.     something starting with __ and the normal name is an alias.  */
  1124. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1125. choke me
  1126. #else
  1127. vprintf();
  1128. #endif
  1129.  
  1130. ; return 0; }
  1131. EOF
  1132. if eval $ac_link; then
  1133.   rm -rf conftest*
  1134.   eval "ac_cv_func_vprintf=yes"
  1135. else
  1136.   rm -rf conftest*
  1137.   eval "ac_cv_func_vprintf=no"
  1138. fi
  1139. rm -f conftest*
  1140.  
  1141. fi
  1142. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1143.   echo "$ac_t""yes" 1>&6
  1144.   cat >> confdefs.h <<\EOF
  1145. #define HAVE_VPRINTF 1
  1146. EOF
  1147.  
  1148. else
  1149.   echo "$ac_t""no" 1>&6
  1150. fi
  1151.  
  1152. if test "$ac_cv_func_vprintf" != yes; then
  1153. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  1154. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  1155.   echo $ac_n "(cached) $ac_c" 1>&6
  1156. else
  1157.   cat > conftest.$ac_ext <<EOF
  1158. #line 1159 "configure"
  1159. #include "confdefs.h"
  1160. /* System header to define __stub macros and hopefully few prototypes,
  1161.     which can conflict with char _doprnt(); below.  */
  1162. #include <assert.h>
  1163. /* Override any gcc2 internal prototype to avoid an error.  */
  1164. char _doprnt(); 
  1165.  
  1166. int main() { return 0; }
  1167. int t() {
  1168.  
  1169. /* The GNU C library defines this for functions which it implements
  1170.     to always fail with ENOSYS.  Some functions are actually named
  1171.     something starting with __ and the normal name is an alias.  */
  1172. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1173. choke me
  1174. #else
  1175. _doprnt();
  1176. #endif
  1177.  
  1178. ; return 0; }
  1179. EOF
  1180. if eval $ac_link; then
  1181.   rm -rf conftest*
  1182.   eval "ac_cv_func__doprnt=yes"
  1183. else
  1184.   rm -rf conftest*
  1185.   eval "ac_cv_func__doprnt=no"
  1186. fi
  1187. rm -f conftest*
  1188.  
  1189. fi
  1190. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1191.   echo "$ac_t""yes" 1>&6
  1192.   cat >> confdefs.h <<\EOF
  1193. #define HAVE_DOPRNT 1
  1194. EOF
  1195.  
  1196. else
  1197.   echo "$ac_t""no" 1>&6
  1198. fi
  1199.  
  1200. fi
  1201.  
  1202. for ac_func in strtod strtol lrand48
  1203. do
  1204. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1205. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1206.   echo $ac_n "(cached) $ac_c" 1>&6
  1207. else
  1208.   cat > conftest.$ac_ext <<EOF
  1209. #line 1210 "configure"
  1210. #include "confdefs.h"
  1211. /* System header to define __stub macros and hopefully few prototypes,
  1212.     which can conflict with char $ac_func(); below.  */
  1213. #include <assert.h>
  1214. /* Override any gcc2 internal prototype to avoid an error.  */
  1215. char $ac_func(); 
  1216.  
  1217. int main() { return 0; }
  1218. int t() {
  1219.  
  1220. /* The GNU C library defines this for functions which it implements
  1221.     to always fail with ENOSYS.  Some functions are actually named
  1222.     something starting with __ and the normal name is an alias.  */
  1223. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1224. choke me
  1225. #else
  1226. $ac_func();
  1227. #endif
  1228.  
  1229. ; return 0; }
  1230. EOF
  1231. if eval $ac_link; then
  1232.   rm -rf conftest*
  1233.   eval "ac_cv_func_$ac_func=yes"
  1234. else
  1235.   rm -rf conftest*
  1236.   eval "ac_cv_func_$ac_func=no"
  1237. fi
  1238. rm -f conftest*
  1239.  
  1240. fi
  1241. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1242.   echo "$ac_t""yes" 1>&6
  1243.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1244.   cat >> confdefs.h <<EOF
  1245. #define $ac_tr_func 1
  1246. EOF
  1247.  
  1248. else
  1249.   echo "$ac_t""no" 1>&6
  1250. fi
  1251. done
  1252.  
  1253. echo $ac_n "checking for getrusage""... $ac_c" 1>&6
  1254. if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
  1255.   echo $ac_n "(cached) $ac_c" 1>&6
  1256. else
  1257.   cat > conftest.$ac_ext <<EOF
  1258. #line 1259 "configure"
  1259. #include "confdefs.h"
  1260. /* System header to define __stub macros and hopefully few prototypes,
  1261.     which can conflict with char getrusage(); below.  */
  1262. #include <assert.h>
  1263. /* Override any gcc2 internal prototype to avoid an error.  */
  1264. char getrusage(); 
  1265.  
  1266. int main() { return 0; }
  1267. int t() {
  1268.  
  1269. /* The GNU C library defines this for functions which it implements
  1270.     to always fail with ENOSYS.  Some functions are actually named
  1271.     something starting with __ and the normal name is an alias.  */
  1272. #if defined (__stub_getrusage) || defined (__stub___getrusage)
  1273. choke me
  1274. #else
  1275. getrusage();
  1276. #endif
  1277.  
  1278. ; return 0; }
  1279. EOF
  1280. if eval $ac_link; then
  1281.   rm -rf conftest*
  1282.   eval "ac_cv_func_getrusage=yes"
  1283. else
  1284.   rm -rf conftest*
  1285.   eval "ac_cv_func_getrusage=no"
  1286. fi
  1287. rm -f conftest*
  1288.  
  1289. fi
  1290. if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
  1291.   echo "$ac_t""yes" 1>&6
  1292.   cat >> confdefs.h <<\EOF
  1293. #define HAVE_GETRUSAGE 1
  1294. EOF
  1295.  
  1296. else
  1297.   echo "$ac_t""no" 1>&6
  1298. cat >> confdefs.h <<\EOF
  1299. #define HAVE_GETRUSAGE 0
  1300. EOF
  1301.  
  1302. fi
  1303.  
  1304.  
  1305. # Try to find out where CLK_TCK is defined if we don't have getrusage.
  1306. # Need to do this because IRIX puts it in <time.h> and <limit.h>, AIX
  1307. # puts it in <time.h>, SunOS doesn't have it, and I dunno about anyone
  1308. # else.  Note: nothing is currently done with the $clk_tck_where
  1309. # value; right now I only worry about the case where CLK_TCK isn't
  1310. # found at all.
  1311.  
  1312. if test "$ac_cv_func_getrusage" = "no"; then
  1313.   echo $ac_n "checking for where to find CLK_TCK symbol""... $ac_c" 1>&6
  1314.   clk_tck_where=""
  1315.   for hdr in "<time.h>" "<limits.h>" ; do
  1316.     if test -z "$clk_tck_where"; then
  1317.       cat > conftest.$ac_ext <<EOF
  1318. #line 1319 "configure"
  1319. #include "confdefs.h"
  1320. #include $hdr
  1321.  #ifdef CLK_TCK
  1322.   yes
  1323.  #endif
  1324.  
  1325. EOF
  1326. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1327.   egrep "yes" >/dev/null 2>&1; then
  1328.   rm -rf conftest*
  1329.   clk_tck_where=$hdr
  1330. fi
  1331. rm -f conftest*
  1332.  
  1333.     fi
  1334.   done
  1335.   if test -z "$clk_tck_where"; then
  1336.     echo "configure: warning: CLK_TCK not found, assuming 60 ticks/sec" 1>&2
  1337.     cat >> confdefs.h <<\EOF
  1338. #define CLK_TCK 60
  1339. EOF
  1340.  
  1341.   else
  1342.     echo "$ac_t""$clk_tck_where" 1>&6
  1343.   fi
  1344. fi
  1345.  
  1346. trap '' 1 2 15
  1347. cat > confcache <<\EOF
  1348. # This file is a shell script that caches the results of configure
  1349. # tests run on this system so they can be shared between configure
  1350. # scripts and configure runs.  It is not useful on other systems.
  1351. # If it contains results you don't want to keep, you may remove or edit it.
  1352. #
  1353. # By default, configure uses ./config.cache as the cache file,
  1354. # creating it if it does not exist already.  You can give configure
  1355. # the --cache-file=FILE option to use a different cache file; that is
  1356. # what configure does when it calls configure scripts in
  1357. # subdirectories, so they share the cache.
  1358. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1359. # config.status only pays attention to the cache file if you give it the
  1360. # --recheck option to rerun configure.
  1361. #
  1362. EOF
  1363. # Ultrix sh set writes to stderr and can't be redirected directly,
  1364. # and sets the high bit in the cache file unless we assign to the vars.
  1365. (set) 2>&1 |
  1366.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1367.   >> confcache
  1368. if cmp -s $cache_file confcache; then
  1369.   :
  1370. else
  1371.   if test -w $cache_file; then
  1372.     echo "updating cache $cache_file"
  1373.     cat confcache > $cache_file
  1374.   else
  1375.     echo "not updating unwritable cache $cache_file"
  1376.   fi
  1377. fi
  1378. rm -f confcache
  1379.  
  1380. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1381.  
  1382. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1383. # Let make expand exec_prefix.
  1384. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1385.  
  1386. # Any assignment to VPATH causes Sun make to only execute
  1387. # the first set of double-colon rules, so remove it if not needed.
  1388. # If there is a colon in the path, we need to keep it.
  1389. if test "x$srcdir" = x.; then
  1390.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1391. fi
  1392.  
  1393. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1394.  
  1395. DEFS=-DHAVE_CONFIG_H
  1396.  
  1397. # Without the "./", some shells look in PATH for config.status.
  1398. : ${CONFIG_STATUS=./config.status}
  1399.  
  1400. echo creating $CONFIG_STATUS
  1401. rm -f $CONFIG_STATUS
  1402. cat > $CONFIG_STATUS <<EOF
  1403. #! /bin/sh
  1404. # Generated automatically by configure.
  1405. # Run this file to recreate the current configuration.
  1406. # This directory was configured as follows,
  1407. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1408. #
  1409. # $0 $ac_configure_args
  1410. #
  1411. # Compiler output produced by configure, useful for debugging
  1412. # configure, is in ./config.log if it exists.
  1413.  
  1414. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1415. for ac_option
  1416. do
  1417.   case "\$ac_option" in
  1418.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1419.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1420.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1421.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1422.     echo "$CONFIG_STATUS generated by autoconf version 2.3"
  1423.     exit 0 ;;
  1424.   -help | --help | --hel | --he | --h)
  1425.     echo "\$ac_cs_usage"; exit 0 ;;
  1426.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1427.   esac
  1428. done
  1429.  
  1430. ac_given_srcdir=$srcdir
  1431.  
  1432. trap 'rm -fr `echo "Makefile extras/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1433.  
  1434. # Protect against being on the right side of a sed subst in config.status. 
  1435. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1436.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1437. $ac_vpsub
  1438. $extrasub
  1439. s%@CFLAGS@%$CFLAGS%g
  1440. s%@CPPFLAGS@%$CPPFLAGS%g
  1441. s%@CXXFLAGS@%$CXXFLAGS%g
  1442. s%@DEFS@%$DEFS%g
  1443. s%@LDFLAGS@%$LDFLAGS%g
  1444. s%@LIBS@%$LIBS%g
  1445. s%@exec_prefix@%$exec_prefix%g
  1446. s%@prefix@%$prefix%g
  1447. s%@program_transform_name@%$program_transform_name%g
  1448. s%@host@%$host%g
  1449. s%@host_alias@%$host_alias%g
  1450. s%@host_cpu@%$host_cpu%g
  1451. s%@host_vendor@%$host_vendor%g
  1452. s%@host_os@%$host_os%g
  1453. s%@CC@%$CC%g
  1454. /@Makefile_OS@/r $Makefile_OS
  1455. s%@Makefile_OS@%%g
  1456. s%@ALTCC@%$ALTCC%g
  1457. s%@OPT@%$OPT%g
  1458. s%@RANLIB@%$RANLIB%g
  1459. s%@AR@%$AR%g
  1460. s%@libsrc@%$libsrc%g
  1461. s%@libobj@%$libobj%g
  1462. s%@jrevdct@%$jrevdct%g
  1463. s%@extras@%$extras%g
  1464. /@Makefile_extras@/r $Makefile_extras
  1465. s%@Makefile_extras@%%g
  1466. s%@CPP@%$CPP%g
  1467.  
  1468. CEOF
  1469. EOF
  1470. cat >> $CONFIG_STATUS <<EOF
  1471.  
  1472. CONFIG_FILES=\${CONFIG_FILES-"Makefile extras/Makefile"}
  1473. EOF
  1474. cat >> $CONFIG_STATUS <<\EOF
  1475. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1476.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1477.   case "$ac_file" in
  1478.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1479.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1480.   *) ac_file_in="${ac_file}.in" ;;
  1481.   esac
  1482.  
  1483.   # Adjust relative srcdir, etc. for subdirectories.
  1484.  
  1485.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1486.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1487.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1488.     # The file is in a subdirectory.
  1489.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1490.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1491.     # A "../" for each directory in $ac_dir_suffix.
  1492.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1493.   else
  1494.     ac_dir_suffix= ac_dots=
  1495.   fi
  1496.  
  1497.   case "$ac_given_srcdir" in
  1498.   .)  srcdir=.
  1499.       if test -z "$ac_dots"; then top_srcdir=.
  1500.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1501.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1502.   *) # Relative path.
  1503.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1504.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1505.   esac
  1506.  
  1507.   echo creating "$ac_file"
  1508.   rm -f "$ac_file"
  1509.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1510.   case "$ac_file" in
  1511.   *Makefile*) ac_comsub="1i\\
  1512. # $configure_input" ;;
  1513.   *) ac_comsub= ;;
  1514.   esac
  1515.   sed -e "$ac_comsub
  1516. s%@configure_input@%$configure_input%g
  1517. s%@srcdir@%$srcdir%g
  1518. s%@top_srcdir@%$top_srcdir%g
  1519. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1520. fi; done
  1521. rm -f conftest.subs
  1522.  
  1523. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1524. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1525. #
  1526. # ac_d sets the value in "#define NAME VALUE" lines.
  1527. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1528. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1529. ac_dC='\3'
  1530. ac_dD='%g'
  1531. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1532. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1533. ac_uB='\([     ]\)%\1#\2define\3'
  1534. ac_uC=' '
  1535. ac_uD='\4%g'
  1536. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1537. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1538. ac_eB='$%\1#\2define\3'
  1539. ac_eC=' '
  1540. ac_eD='%g'
  1541.  
  1542. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1543. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1544.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1545.   case "$ac_file" in
  1546.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1547.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1548.   *) ac_file_in="${ac_file}.in" ;;
  1549.   esac
  1550.  
  1551.   echo creating $ac_file
  1552.  
  1553.   rm -f conftest.frag conftest.in conftest.out
  1554.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1555.  
  1556. EOF
  1557.  
  1558. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1559. # the proper values into config.h.in to produce config.h.  And first:
  1560. # Protect against being on the right side of a sed subst in config.status. 
  1561. # Protect against being in an unquoted here document in config.status.
  1562. rm -f conftest.vals
  1563. cat > conftest.hdr <<\EOF
  1564. s/[\\&%]/\\&/g
  1565. s%[\\$`]%\\&%g
  1566. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1567. s%ac_d%ac_u%gp
  1568. s%ac_u%ac_e%gp
  1569. EOF
  1570. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1571. rm -f conftest.hdr
  1572.  
  1573. # This sed command replaces #undef with comments.  This is necessary, for
  1574. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1575. # on some systems where configure will not decide to define it.
  1576. cat >> conftest.vals <<\EOF
  1577. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1578. EOF
  1579.  
  1580. # Break up conftest.vals because some shells have a limit on
  1581. # the size of here documents, and old seds have small limits too.
  1582. # Maximum number of lines to put in a single here document.
  1583. ac_max_here_lines=12
  1584.  
  1585. rm -f conftest.tail
  1586. while :
  1587. do
  1588.   ac_lines=`grep -c . conftest.vals`
  1589.   # grep -c gives empty output for an empty file on some AIX systems.
  1590.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1591.   # Write a limited-size here document to conftest.frag.
  1592.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1593.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1594.   echo 'CEOF
  1595.   sed -f conftest.frag conftest.in > conftest.out
  1596.   rm -f conftest.in
  1597.   mv conftest.out conftest.in
  1598. ' >> $CONFIG_STATUS
  1599.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1600.   rm -f conftest.vals
  1601.   mv conftest.tail conftest.vals
  1602. done
  1603. rm -f conftest.vals
  1604.  
  1605. cat >> $CONFIG_STATUS <<\EOF
  1606.   rm -f conftest.frag conftest.h
  1607.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1608.   cat conftest.in >> conftest.h
  1609.   rm -f conftest.in
  1610.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1611.     echo "$ac_file is unchanged"
  1612.     rm -f conftest.h
  1613.   else
  1614.     rm -f $ac_file
  1615.     mv conftest.h $ac_file
  1616.   fi
  1617. fi; done
  1618.  
  1619.  
  1620.  
  1621. exit 0
  1622. EOF
  1623. chmod +x $CONFIG_STATUS
  1624. rm -fr confdefs* $ac_clean_files
  1625. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1626.  
  1627.